import java.util.LinkedList;
import java.util.List;

public class Year {

	public static void main(String[] args) {
		List list = new LinkedList();
		for (int i = 2017;; i++) {
			if (list.size() <= 100) {
				if (i % 4 == 0 && i % 400 != 0) {
					list.add(i);
				}
				continue;
			}
			break;
		}
		System.out.println(list);
	}
}
